<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<title>aem | 2. API overview</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="all"><!--@import url(full.css);--></style>

</head>
<body>

<h1>2. API overview</h1>

<!-- top navigation -->
<div class="navbar">
	<a href="01_introduction.html">Previous</a> | <a href="index.html">Up</a> | <a href="03_packingandunpackingdata.html">Next</a>
</div>

<!-- content -->
<div id="content">

<h2>Classes</h2>

<p>The main aem classes are as follows:</p>

<dl>
<dt>AEMApplication</dt>
<dd>Represents a scriptable application, and provides methods for constructing <code>AEMEvent</code> instances.</dd>

<dt>AEMEvent</dt>
<dd>Represents an Apple event, and provides methods for adding parameters and attributes, and for sending it.</dd>

<dt>AEMCodecs</dt>
<dd>Provides <code>-pack:</code> and <code>-unpack:</code> methods for converting Foundation values to NSAppleEventDescriptors, and vice-versa. Clients usually don't need to access this class directly.</dd>

<dt>AEMType, AEMEnum</dt>
<dd>Represent Apple event type and enumerator values.</dd>

</dl>

<p>In addition, there are a number of classes used to represent application references, although the user does not instantiate these directly.</p>


<h2>Macros</h2>

<p>The AEM module exports three macros for use in constructing application references:</p>

<dl>
<dt>AEMApp</dt>
<dd>Returns the base object used to construct absolute references.</dd>

<dt>AEMCon</dt>
<dd>Returns the base object used to construct relative reference to container object (used in by-range specifiers).</dd>

<dt>AEMIts</dt>
<dd>Returns the base object used to construct relative reference to object being tested (used in by-filter specifiers).</dd>
</dl>


<p>References are constructed from these base objects using chained property/method calls.</p>


<h2>Functions</h2>

<p>The aem package also exports several functions:</p>

<dl>
<dt>AEMFindApplication</dt>
<dd>Locates applications by name, bundle id and/or creator code. (See also the <code>AEMFindAppWithCreator</code>, <code>AEMFindAppWithBundleID</code> and <code>AEMFindApplication</code> macros.)</dd>

<dt>AEMIsApplicationRunning</dt>
<dd>Checks if a given application is running.</dd>

<dt>AEMLaunchApplication</dt>
<dd>Launches an application (basically a convenience wrapper around the Process Manager's <code>LaunchApplication</code> function).</dd>

</dl>



</div>

<!-- bottom navigation -->
<div class="navbar">
	<a href="01_introduction.html">Previous</a> | <a href="index.html">Up</a> | <a href="03_packingandunpackingdata.html">Next</a>
</div>

<!--footer-->
<p class="footer">&copy; 2007 HAS</p>
</body>
</html>